package main

import (
	"github.com/gin-gonic/gin"
	"liao/appconfig"
	"liao/inits"
	"liao/pkg"
	"liao/router"
)

func main() {
	// 1.创建路由
	appconfig.Init()
	inits.InitMysql()
	inits.InitRedis()
	r := gin.Default()
	router.Router(r)
	rabbitmq := pkg.NewRabbitMQSimple("zhoukao2")
	go rabbitmq.ConsumeSimple()
	// 3.监听端口，默认在8080
	// Run("里面不指定端口号默认为8080")
	r.Run(":8000")
}
